package com.niiwoo.activity.event.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhaoqiang
 * @ClassName: UserPrizeTypeIdEnum
 * @Description: 红包类型枚举
 * @date 2017/11/23
 * var typs = {'0':'提现红包','1':'担保代金券','2':'担保投资代金券','3':'投资代金券','4':'现金红包','5':'担保理财金','7':'投资理财金','8':'投资加息券','9':'投资返现红包','10':'担保返现红包','11':'借款返现红包'};
 */
@Getter
@AllArgsConstructor
public enum UserPrizeTypeEventEnum {

    // 红包类型：0 提现红包、 4现金红包、5担保理财金、7投资理财金、8投资加息券、 9投资返现红包、10担保返现红包、11借款返现红包 12借款利率折扣卡
    WITHDRAW_VOUCHER(Byte.valueOf("0"), "提现红包"),
    //GUARANTEE_VOUCHER((byte) 1, "担保代金券"),
    //GUARANTEE_INVESTMENT_VOUCHER((byte) 2),
    //INVESTMENT_VOUCHER((byte) 3, "投资代金券"),
    CASH_REDPACKET(Byte.valueOf("4"), "现金红包"),
    GUARANTEE_EXPERIENCE(Byte.valueOf("5"), "担保理财金"),
    //    GUARANTEE_INVESTMENT_EXPERIENCE((byte) 6, "担保投资体验券"),
    INVESTMENT_EXPERIENCE(Byte.valueOf("7"), "投资理财金"),
    INVESTMENT_RAISE_INTEREST_RATES(Byte.valueOf("8"), "投资加息券"),
    INVESTMENT_CASHBACK(Byte.valueOf("9"), "投资返现红包"),
    GUARANTEE_CASHBACK(Byte.valueOf("10"), "担保返现红包"),
    LOAN_CASHBACK(Byte.valueOf("11"), "借款返现红包"),
    BORROW_INTEREST_RATE_DISCOUNT(Byte.valueOf("12"), "借款利率折扣卡");

    private Byte prizeType;
    private String description;


    public static UserPrizeTypeEventEnum valueOf(Byte prizeTypeId) {
        for (UserPrizeTypeEventEnum typeEventEnum : values()) {
            if (typeEventEnum.getPrizeType().equals(prizeTypeId)) {
                return typeEventEnum;
            }
        }
        return null;
    }

}
